package com.autoTest.common;

import org.openqa.selenium.chrome.ChromeDriver;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: lenovo
 * Date: 2023-01-20
 * Time: 10:14
 */
public class CommonDriver {
    private  static  ChromeDriver driver = null;
    public static ChromeDriver getDriver(){
        if (driver == null){
            synchronized (ChromeDriver.class) {
                if (driver == null){
                    driver = new ChromeDriver();
                }
                return driver;
            }
        }
        return driver;

    }
}
